package com.lm.upms.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.lm.common.core.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 角色信息
 *
 * @author lm
 * @date 2019/5/31
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysRole extends BaseEntity<SysRole> {

    @TableId(value = "role_id", type = IdType.AUTO)
    private Integer roleId;

    @NotBlank(message = "角色名称 不能为空")
    private String roleName;

    @NotBlank(message = "角色标识 不能为空")
    private String roleKey;

    private String roleSort;

    private String dataScope;

    private String status;

    // @NotBlank(message = "角色描述 不能为空")
    // private String roleDesc;

    @TableLogic
    private String delFlag;

    private transient List<String> menuIds;

    @Override
    protected Serializable pkVal() {
        return this.roleId;
    }

}